<?php
/**
 * Created by PhpStorm.
 * User: 马超
 * Date: 2017/12/11
 * Time: 16:11
 */

namespace console\controllers;

use app\common\HttpCurl;
use Yii;
use yii\console\Controller;
use yii\console\Exception;

class RegisterChannelController extends Controller
{

    public function actionRegister(){
        $method = Yii::$app->params['callback_method'];
        $result = HttpCurl::post("yanxuan.callback.method.register",['methods'=>$method]);
        echo $result;
        exit;
    }

    public function actionRegisterFields(){
        date_default_timezone_set('PRC');

        /*$res = HttpCurl::post("yanxuan.itemChange.field.list");
        var_dump($res);*/

        $fields = Yii::$app->params['callback_fields'];
        $result = HttpCurl::post("yanxuan.callback.itemChange.register",['fields'=>$fields]);
        var_dump($result);

        exit;
    }


}